This is a simple solution:
Although the pulse is inverted (0V -> 5V, 1V -> 4V), but i think this is easy to change in the uC.
depending on the amount of current you need to drive, you can choose the size of R1.
by making R2 trimmable you can set the lower voltage (4V)
The current through R1 is set by R2 : the voltage over R2 when the input is high is the input voltage minus the threshold voltage of the transistor ( ~ 0.7V). so you can calculate the current through R2 (I = (Vin-0.7)/R2 ), which is the same as the current through R1. The lower pulse voltage will be I*R1.
By changing R2, you can change the pulse depth.
you can use any kind of general purpose npn transistor for this.
With this approach the resistive divider isn't necessary (you can also use 0V..3V as pulse but you will have to change R2, this situation is displayed in the picture).
I hope this helps.