The L and D nomenclature is directly transform from its origin, D- and L-phenylalanine. The following scheme summarize the transformation:
The blue box in right-hand corner explains how L- and D-$\alpha$-amino acids get their names using Fischer projection (this is similar to D- and L-monosaccharides, replacing $\ce{OH}$ group by $\ce{NH2}$ group). If you reduced the carboxylate group of amino acid to a methyl group, the optical rotation of $\alpha$-carbon change from $(S)$ to $(R)$ because second highest priority of $\ce{COOH}$ group to third highest ($\ce{CH3}$ group) based on the size of the $\ce{R}$ group (see general formula of amino acid in top right corner). For example, when $\ce{R=CH2Ph}$ group, the amino acid is phenylalanine, which has $(S)$-rotation, but reduction of caboxylate group to methyl make the rotation $(R)$. However, the product $(R)$-amphetamine still carries the original L-nomenclature (see examples in bottom red box).
Note: The conversion of phenylalanine to amphetamine in several steps were achieved in beginning of 21st century (Ref.1).This is the ultimate enanthimerically pure version.
Reference:
- Dominick A. Quagliato, Patrick M. Andrae, Edward M. Matelan, “Efficient Procedure for the Reduction of α-Amino Acids to Enantiomerically Pure α-Methylamines,” J. Org. Chem. 2000, 65(16), 5037–5042 (https://doi.org/10.1021/jo000242h).