How to control external voltage via PWM

No.
You might be able to replace the adjustable resistor with a digipot.