My first thought was to use a digital potentiometer, such as the AD5141, to replace the Rx1 and Rx2 resistors. They are usually programmed from an MCU via I2C or SPI. The AD1541 does either, offers 256 different potentiometer "wiper positions", and can also retain its "set position" when powered off and on again.
The other idea is to use a voltage controlled current source, as suggested by @Whit3rd, but I'll offer a more commonly implemented solution than the LM13700 OTA. The principle is to use a DC potential from a DAC to set the current in the path to ground via Rx and Cx, which will determine the charge rate of the capacitor:

simulate this circuit – Schematic created using CircuitLab
Note: the op-amp should be a rail-to-rail output type in this application.
Replace Rx with the blue boxed section, between A and B. I've also shown Cx, and the connection to the monostable IC.
Usually charging of Cx is exponential, towards +5V, and the timing is related to the time constant \$R_X \times C_X\$. With a constant current source such as this one, charge rate is proportional to current \$I\$, which is controlled by the potential \$V_{IN}\$ at IN. With the component values shown, \$I\$ and \$V_{IN}\$ are related as follows:
$$ I = \frac{5 - V_{IN}}{10\times R_1} $$
The values I chose here will produce a range of currents around what would be present given your existing resistance \$R_X=5k\Omega\$. Unfortunately, the 4538 datasheet doesn't tell us the switching threshold \$V_{REF}\$ at pins 2 and 14, so it's very difficult to say what exact currents are needed. I'm afraid you'll have to experiment with R1 and Cx to obtain an appropriate range of pulse durations, over an input range of, say, \$0V < V_{IN} < +4.5V\$.
If you plan to use a PWM signal from the microcontroller, you will need to make sure it's very well filtered, to remove all ripple from the DC potential you apply to IN. That's not easy, and I recommend using a clean stable signal from a DAC instead. Any ripple at IN will cause timing jitter that will show up in the image.