Time- and Wavelength-Division Multiplexing (TWDM) increases the capacity of Passive Optical Networks by up to 40 Gbps by using several wavelengths (typically four). It introduces tunable transceivers into the Optical Network Units (ONUs) for switching from one wavelength to the other, thus addressing the ever-increasing bandwidth demands in residential broadband and mobile fronthaul networks based on Fiber to the Home (FTTH) technology. This adds complexity and sources of inefficiency, such as the laser tuning time (LTT) delay, which is often ignored when evaluating the performance of Dynamic Bandwidth Allocation (DBA) mechanisms. We present a novel DBA algorithm that dynamically handles the allocation of bandwidth and switches the ONUs’ laser from one wavelength to the other while taking LTT into consideration. To optimize the packet delay, we introduce a scheduling mechanism that follows the Longest Processing Time first (LPT) scheduling discipline, which is implemented over the Interleaved Polling with Adaptive Cycle Time (IPACT) DBA. We also provide quality of service (QoS) differentiation by introducing the Max-Min Weighted Fair Share Queuing principle (WFQ) into the algorithm. The performance of our algorithm is evaluated through simulations against the original IPACT algorithm, which we have extended to support multi-wavelengths. We obtain an improved performance of up to 73% and 33% reduction in queue delay in, respectively, IPACT and WFQ.