Optically controlled spatial modulation of (sub-)millimeter waves using nipi-doped semiconductors