The co-design of multiple-input multiple-output (MIMO) radar waveforms and the associated beampattern is desirable to maximize transmitted power in directions of interest while still maintaining acceptable waveform correlation properties. While MIMO is an emerging technology in radar, one must also consider the stringent spectral requirements that are currently being imposed now and that may become even more stringent in the future. In this paper a MIMO optimization method based on alternating projections is introduced that optimizes, for a uniform linear array, the constant-modulus, continuous-time, element-level waveforms to produce a spectral shape in various desired spatial directions denoted "beams of interest". The resulting beampattern is directly related to these chosen "beams of interest". To address the physical nature of the MIMO emission, the energy stored in the invisible space (i.e. not radiated into the far-field) is considered. It is shown that this stored energy, which could damage the transmitter if operated at high power, can effectively be minimized by optimizing the beampattern based on the visible emission space.