Exceeding _Enable input voltage_ of optocoupler
On the first page of the datasheet, you can see the following diagram. Enable pin has nothing to do with the LED. You can have any voltage on the connectors, as long as you don't exceed the maximum LED current.



At 24V and with a 2.4k resistor, you would have If = (24-1.5)/2400 = 9.375mA. I wouldn't set it so high for extended periods of time, but it is within the limits.