Catalyzes the first step of ergot alkaloid biosynthesis. Ergot alkaloids, which are produced by endophyte fungi, can enhance plant host fitness, but also cause livestock toxicosis to host plants (By similarity). dimethylallyl diphosphate + L-tryptophan = 4-(3-methylbut-2-enyl)-L-tryptophan + diphosphate Alkaloid biosynthesis; ergot alkaloid biosynthesis. Homodimer. Belongs to the tryptophan dimethylallyltransferase family.