Two main classes of traffic demands may be considered in data networks: virtual private networks (VPN) and random traffic requests. In this paper, we investigate traffic engineering for such traffic classes in the context of hybrid WDM optical networks. A hybrid optical network is made of a set of multi-granularity switches, each electrical cross-connect (EXC) of the network being coupled to an optical cross-connect (OXC). Our approach differs from existing approaches by combining global optimization tools with iterative optimization tools to solve the routing and wavelength assignment (RWA) problem. For this reason, a simulated annealing meta-heuristic has been developed to route lightpath demands associated to VPN traffic. On the other hand, random demands are routed sequentially by means of a Dijkstra algorithm. Hence, space-time correlation between demands as well as sub-wavelength traffic grooming have been considered in our RWA strategy.