In this paper, we address the routing and wavelength assignment problem for the core-based tree (CBT) service in a wavelength-division-multiplexing (WDM) network, where k sources need to send data to a common core node. We formally model the problem as a problem of finding k shortest lightpaths from sources to the core with the constraint of wavelength collision free. To address different objectives, we define and study several subproblems. For the feasibility and the minimum total cost problems of k shortest lightpaths, we show how the classical network flow algorithms can be modified and applied efficiently on the network flow model constructed on the transformed wavelength graph. For the minimum max-cost and the constrained feasibility problems, we prove their NP-completeness and propose two efficient heuristic algorithms. Simulation results show that the proposed heuristic algorithms achieve performance very close to the calculated lower bounds.