In this paper, we propose a new algorithm that designs a transmit beampattern for Multiple-Input Multiple-Output (MIMO) radar considering coexistence with other wireless systems. This design process is conducted by minimizing the deviation of the generated beampattern against an idealized one while enforcing the waveform elements to be constant modulus and in the presence of spectral restrictions, which translates to a quadratic waveform constraint. This leads to a hard nonconvex optimization problem due to simultaneous presence of the constant modulus constraint (CMC) and spectral constraint (SpecC). In this work, we employ the geometrical structure of CMC, that is we redefine this constraint as an intersection of two sets. This definition allows us to handle the design problem in more tractable way. The proposed Iterative Beampattern with Spectral design (IBS) algorithm solves a sequence of convex problems such that constant modulus is achieved at convergence. Furthermore, we show that at convergence the obtained solution satisfies the Karush-Kuhn-Tucker (KKT) conditions of the aforementioned non-convex problem. Finally, we evaluate the proposed algorithm over challenging simulated scenarios, and show that it outperforms the state of the art competing methods.