Optical grids are emerging as a natural, costeffective platform to meet the needs for powerful computing, large storage capacity and high-speed data transmission capabilities in a number of important application areas. In spite of the lower power cost per bit of optical networks, it is expected that one of the most challenging issues in the next decade will be reducing the power requirement for such core networks. Much of the recent work on optical grid network design has focused on optimizing the use of traditional computing and network resources in an integrated manner. In grid systems, it is typically possible to select one out of a number of possible destinations to execute a specific job. This is known as anycasting, and in this paper we propose a new approach for energy minimization in optical grids that exploits the inherent flexibility of anycasting. We present a comprehensive integer linear program (ILP) formulation that selects the destination node and performs routing and wavelength assignment (RWA) to minimize the overall energy consumption of a set of static lightpath demands. We also present a 2-stage ILP that can quickly generate solutions for large networks. Simulation results indicate that significant energy savings can be achieved by the proposed approach, not only compared to traditional RWA techniques but also over energy-aware unicast methods.