Semiconductor nanowires (NWs) are a good candidate for future optoelectronic devices. However, the control of the essential parameters that determine the electronic and optical quality of NWs, such as crystal structure and incorporation of impurity dopants, are still challenging problems. Most III-V NWs exhibit crystal defects, which are typically randomly distributed zincblende twinning segments and stacking faults that can affect the optical and electrical properties of NW devices. The incorporation of intentional impurity dopants in NWs is important for the fabrication of p-n junctions and control of the electrical conductivity of NWs. The effect of Te and Be impurity dopant concentration on the crystal structure, surface roughness and optical properties of GaAs NWs will be presented. Four identical GaAs NW arrays were grown: an undoped sample (as a reference) and 6 samples with different Te and Be doping concentration. High resolution transmission electron microscopy (HRTEM) revealed an unusual superlattice twinning, with periodicity that became wider and more regular as the doping level increased. Twin boundaries in GaP are shown to act as an atomically narrow plane of wurtzite phase with a type-I homostructure band alignment. Twin boundaries and stacking faults (wider regions of the wurtzite phase) lead to the introduction of shallow trap states observed in photoluminescence studies. Controlling the surface roughness, the periodicity, and the width of twinning planes with doping concentration might open new possibilities for high efficiency NW-based thermoelectric devices, but also has wide implications for all NW devices.