We show control of the crystal structure of indium phosphide (InP) and gallium phosphide (GaP) nanowires by impurity dopants. More importantly, we demonstrate that we can, once we have enforced the zinc blende crystal structure, induce twinning superlattices with long-range order in the length direction in the nanowires. The spacing of the superlattices is tuned by the wire diameter and the zinc dopant concentration. These findings have been quantitatively modelled based on the cross-sectional shape of the zinc-blende nanowires.