We consider the offline version of the routing and wavelength assignment (RWA) problem in transparent all-optical networks. In such networks and in the absence of regenerators, the signal quality of transmission degrades due to physical layer impairments. Because of certain physical effects, routing choices made for one lightpath affect and are affected by the choices made for the other lightpaths. This interference among the lightpaths is particularly difficult to formulate in an offline algorithm since, in this version of the problem, we start without any established connections and the utilization of lightpaths are the variables of the problem. We initially present an algorithm for solving the pure (without impairments) RWA problem based on a LP-relaxation formulation that tends to yield integer solutions. Then, we extend this algorithm and present two impairment-aware (IA) RWA algorithms that account for the interference among lightpaths in their formulation. The first algorithm ta...