I understood wrong, so you want to create adjustable voltage output with buffer (OP-amp)?

Even with your heavy filtering, you'll have a nasty ripple on PWM out (= OP amp input). If you add diode (cathode to OP amp) in front of RC-filter, the you'll get rid of pull-down effect of PWM. This will require additional pull-down resistor (after RC) to sink current when you want to reduce voltage (= decrease PWM duty cycle). Also d1 function will need some re-tuning.

Can you measure what is input voltage to OP amp? If that PIC output is 5V then problem is in your OP amp.

BR,
-Gusse-