Orthogonal frequency division multiplexing (OFDM) has been recognized as a suitable candidate for cognitive radio (CR) systems. However, the high sidelobe leakage in OFDM systems can cause serious interference to primary users (PUs) operating in adjacent bands. The major challenge before an OFDM based CR is to keep interference level in PU band below prescribed mask while maximizing the quality-of-service of the cognitive user. The existing techniques are either computationally intensive or spectrally inefficient. This paper presents a low complexity spectral precoder which minimizes error-vector-magnitude (EVM) of secondary user while constraining the transmitted waveform below the prescribed spectral mask. The optimal precoding matrix can be computed offline for a given mask, thus limiting the online computations to only linear matrix-to-vector multiplication. This paper also presents a suboptimal approach for obtaining precoding matrix, which significantly reduces both online and offline complexity. Moreover, we discuss a tradeoff between complexity and EVM. We also investigate the performance of the proposed technique in multiuser scenario. Simulation results show that the proposed scheme outperforms existing techniques in terms of BER, complexity, and spectral characteristics.