On-chip temperature compensation (TC) for optical transmitter (Tx) modules is reported. The TC block is integrated in common silicon (Si)-substrate with the Tx and demonstrates the ability to maintain a constant VCSEL output light power without an additional monitoring photodiode. Designed and fabricated in a 0.13 mu m technology, the Tx with a TC block operates at up to 5 Gbit/s. A BER of less than 10(-12) is achieved at a received input power of -3 dBm, with a 1.3 dBm variation of received power for a temperature increase of 20-100 degrees C at 5 Gbit/s data rate. The percentage error of the temperature compensated Tx output light power is +/- 3%. The Tx module consumes a power of 20 mW at 1.3 V, including the TC block.