Routing and wavelength assignment (RWA) aims to assign the limited number of wavelengths in a wavelength-division multiplexed (WDM) optical network so as to achieve greater capacity. In a recent paper [6], Datta et al. studied the problem of establishing a set of disjoint lightpaths on a tree topology using a single wavelength to maximize the total traffic supported by the chosen set of lightpaths. They discussed applications of this problem to RWA and presented a dynamic programming algorithm which optimally solves this problem in O(n4 + nD3 ) time, where n is the number of nodes in the network and D is the maximum node degree. In this paper, we present an improved algorithm with a time complexity of O(n2 + nD2 ).