Traffic grooming techniques are used to combine low-speed data streams onto high-speed lightpaths with the objective of minimizing the network cost, or maximizing the network throughput. In this article, we present a complete suite of efficient Integer Linear Program (ILP) formulations for logical topology design and traffic grooming on mesh WDM networks. Our formulations can be easily modified to implement different objective functions and, contrary to previous formulations, our ILP formulation can be used to generate optimal solutions for practical sized networks with hundreds of requests. Our first set of formulations addresses the complete logical topology design traffic grooming problem, including RWA and traffic routing. The second set uses the simplifying assumption that RWA is not an issue. The last two sets address optimal traffic grooming alone, where the logical topology is already specified. We have studied these formulations, using simulation with networks having up to 30 nodes, and with hundreds and, in some cases, over a thousand low-speed data streams and have shown that the formulations are able to generate optimal solutions within a reasonable amount of time.