We propose a novel optoelectronic technique for optical submillimeter-wave interaction. By illuminating a spatially periodic pattern of a femtosecond laser beam on a semiconductor surface, optically induced THz electromagnetic beams can be steered by controlling the pattern structure with two degrees of freedom. We also demonstrated the temporal encoding of the radiated electromagnetic wave by the optical intensity spatial distribution.