We demonstrate the control of polarization and dipole moment in semiconductor nanostructures, through nanoscale engineering of shape and composition. Rodlike nanostructures, elongated along the growth direction, are obtained by molecular beam epitaxial growth. By varying the aspect ratio and compositional contrast between the rod and the surrounding matrix, we rotate the polarization of the dominant interband transition from transverse-electric to transverse-magnetic, and modify the dipole moment producing a radical change in the voltage dependence of absorption spectra. This opens the way to the optimization of quantum dot amplifiers and electro-optical modulators.