How fast is the signal - do you need to add any filtering etc.?
It depends how much you want to 'gold plate' the solution.
e.g. this optoisolator driver circuit will protect against reverse polarity and any voltage up to 100V, turns on between 10V and 14V, and holds the Opto LED If constant at 5mA +/-10% over the range 18V to 50V.
D1 provides reverse polarity protection and D3 sets the logic '0' threshold ('holdoff' voltage). Q1, D2 and R1 limit the voltage available, and R2 sets the opto LED current. You'll probably have to tweak it a bit fr your chosen opto's Vf@5mA.
MPSA29G is a 'jellybean' Darlington that can be got for $0.10 each, and the two Zeners are low dissipation so just about any 5% part of a suitable voltage can be substituted.
The closer you make the holdoff voltage to the emitter voltage of Q1, the closer the tolerance the Zeners need to be to maintain the desired If. Make D3 a 5.1V Zener and increase R2 to 1K5, and you can use 10% Zeners, but it spreads out the turn-on region to 7V to 15V