An optocoupler plus one resistor will do this. At only 5 mA, the output transistor will be a saturated transistor switch, with less than 0.1 V drop across it.. Choose an optocoupler with a CTR (current transfer ratio) of at least 100%, with a standard transistor output, not a darlington.
ak