That might work. If you are lowpass filtering the PWM prior to going to the op amp, you should put the same filter on +5V. If you are not filtering the PWM, you will need to pay attention to op amp bandwidth and slew rate.
Yes, i am lp filtering the pwm, i do this in order to get the "analog" signal. For the sake of my education, why should i put the same filter on the +5?