Time- and wavelength-division multiplexed passive optical networks (TWDM-PONs) have been selected by the full services access network community as the most suitable technology for next-generation optical access networks. A key technology in TWDM-PON is the colorless optical network unit transceiver. This paper proposes a flexible, tunable optical transceiver that uses directly modulated tunable lasers. Using a field-programmable gate array (FPGA), programmable reconfigurations and testing capabilities can be embedded into the transceiver in order to implement wavelength control, signal generation, pre-emphasis for upstream, and a bit error rate (BER) test for the downstream. To ensure high-quality signal generation at different bitrates, impedance matching between the laser driver circuit and the laser diodes is optimized. Using the proposed transceiver, three-section-distributed Bragg reflector tunable lasers at or below direct modulation through a 40-km standard mode fiber transmission were successfully implemented.