I think you could do something like this with a road bike with vertical dropouts, 130 rear spacing, and a derailleur hanger
Screw on a 5 speed freewheel on the freewheel side of a flip flop hub and a fixed cog on the other.
When riding fixed the derailleur works as a chain tensioner.