That's how the very first computers worked:
https://www.computerhistory.org/storageengine/edsac-computer...
Not optical, but piezo electrical, usually with a crystal or air as the medium instead of mercury. Optical is much the same principle, a feedback loop incorporating the delay line, so the same bits get re-injected over and over again and can only be read out at specific points in time.