Optical transmitter for fiber optic communications