We report on the effect of Mg doping on the properties of GaN nanowires grown by plasma assisted molecular beam epitaxy. The most significant feature is the presence of triple-twin domains, the density of which increases with increasing Mg concentration. The resulting high concentration of misplaced atoms gives rise to local changes in the crystal structure equivalent to the insertion of three non-relaxed zinc-blende (ZB) atomic cells, which result in quantum wells along the wurtzite (WZ) nanowire growth axis. High resolution electron energy loss spectra were obtained exactly on the twinned (zinc-blende) and wurtzite planes. These atomically resolved measurements, which allow us to identify modifications in the local density of states, revealed changes in the band to band electronic transition energy from 3.4 eV for wurtzite to 3.2 eV in the twinned lattice regions. These results are in good agreement with specific ab initio atomistic simulations and demonstrate that the redshift observed in previous photoluminescence analyses is directly related to the presence of these zinc-blende domains, opening up new possibilities for band-structure engineering.