Considering the time-averaged behavior of a metro elastic optical network, we develop a joint procedure for resource allocation and traffic shaping to exploit the inherent service diversity among the requests for a power-efficient network operation. To support quality of service diversity, we consider minimum transmission rate, average transmission rate, maximum burst size, and average transmission delay as the adjustable parameters of a general service profile. The work evolves from a stochastic optimization problem, which minimizes the power consumption subject to stability, physical, and service constraints. The optimal solution of the problem is obtained using a complex dynamic programming method. To provide a near-optimal fast-achievable solution, we propose a sequential heuristic with a scalable and causal software implementation, according to the basic Lyapunov iterations of an integer linear program. The heuristic method has a negligible optimality gap and a considerable shorter runtime compared to the optimal dynamic programming, and reduces the consumed power by 72% for an offered traffic with unit variation coefficient. The adjustable trade-offs of the proposed scheme offer a typical 10% power saving for an acceptable amount of excess transmission delay or drop rate.