You’ve basically said much of what I was going to!
We know where memories are stored in the brain, physically. The biggest problem with targeting specific memories is simply a matter of working out which neurons are tied to that memory.
We can already, fairly crudely, see roughly where a memory is stored by looking at brain activity when the patient recalls it. We can also directly trigger memory recollection by applying electrodes to the brain during brain surgery.
There’s still massive engineering challenges to overcome to get this to a practical stage, but engineering challenges are usually surmountable. With that in mind, will the technology be doable, ever?
Technology to erase specific memories - absolutely.
Technology to replace specific memories with new ones - I suspect yes, but that’ll need some big leaps in our understanding of how memories actually work.
Technology to do this with just a flash of light - no, probably not.