The optical sensor side is literally an IR led
You mean the transmitter? The sensor side can be a phototransistor, a darlington phototransistor pair, sometime just a photodiode, but not a LED. OP, the datasheet for the particular optoisolate that you get will tell you which of these it is, feel free to share that datasheet here.
Usually the forward voltage drop is 1.1v and the max current is 80ma or so.
Should work fine with a typical 30ma flowing
So for 5v you need to get rid of 3.9v @30ma so try a 220ohm resister
555 can handle more current if needed to pull the opto on harder, but the current flowing through the mouse buttons is probably very tiny
If it's a wireless mouse you'll want to minimise current draw
If it's corded it doesn't matter
A phototransistor will allow current to flow on the output/detector side in proportion to the amount of current flowing on the input/LED side. So, for an example optoisolator with a CTR (current transfer ratio) of 20%, if you put 30mA through the LED, 6mA will be allowed to flow through the output side. As indicated above, you might only need to pull 1mA or less to bring the button voltage down, in which case you'd be fine with 5mA on the LED. Point is, you may well get away with putting less current through the LED (you can just experiment to find out). If battery consumption is a concern, you may wish to look into darlington optoisolators, they require even less input current (due to a CTR of 350% or more).