I have something like that too they say its due to the changes in light just like with the dots you see when you look at a bright light for long then look way. Its normal though lol and i dont know how to stop it you really caint, just one of those things that just has to happen ya know but try to stay in one type of light when you dont want it to happen hope that helps..
Peace
You should head to an Ophthalmologist and have it checked. Flashes on the edges of the vision field can be a sign of a detached or detaching retina.
I suggest you see a Ophthalmologist it could be a torn Retina