Can you use an opto-coupler to isolate the incoming supply from the output
No.  Opto-couplers transmit signal, not power.

If you are worried about shorting the output of the same power supply the PC is using, then it's probably best if you don't use it for that.  You could put a regular fuse in series, but that will take a little time to react and won't protect against the immediate glitch.  A "polyfuse" has enough resistance that even a short on the outside probably won't glitch the supply inside the PC enough to matter, but you have to be aware of the series resistance.

The PC power supply is unlikely to let a short damage it, but if you might be doing bad things like shorting it, you really should get a separate bench supply for powering your questionable stuff.