We propose and experimentally demonstrate an optical self-interference cancellation system to enable more efficient spectrum management and sensing in cognitive radios. The optical system is a radio-frequency front-end module, which cancels in-band self-interference, permitting a radio to simultaneously transmit and receive. By cancelling enough self-interference, a cognitive radio can perform continuous spectrum sensing, even while transmitting, to detect the presence of a licensed user or to scan for spectrum white spaces. The system achieves 83 dB of narrowband interference cancellation, and 60 dB of cancellation of a 50 MHz frequency-modulated signal. The center frequency of the optical canceler is freely tunable across the radio frequency spectrum, limited only by the bandwidth of the photodetector and the electro-optic modulators to 10 GHz. The system is modulation-format independent and requires only one piece of hardware to operate across a wide bandwidth.