Anisotropic phonon generation in GaAs epilayers and pn junctions