Do you see any black things floating in your vision? How is your vision? Do you have a headache with it? What other medical conditions do you have?
It sounds like you are having some migraine episodes. These usually start with flashing in the periphery. Some people even lose part of their vision (as if you were having a stroke). It usually lasts 15-20 minutes. These may or may not be followed by a headache. If its just the visual symptoms, it's called ocular migraines. They are caused by spasms of blood vessels just like classic migraines. They are also treated the same way. It wouldn't hurt to see an eye doctor to make sure your eyes are OK. But a general internist should be able to treat your migraines.
Hope this helps and thank you.