Try not to pay attention to it.
Wen I close my eyes, I see pitch black... But when I concentrate on that pitch black color, I start seeing dots, colours and blobs. I think what you have is normal, you should empty your mind berfore goign to sleep.
Another good technique is self-hypnosis, it not as good as getting a proper hypnosist to do it, but it works quite well on many people.
What you should do is close you eyes and repeat the same sentence in your head over and over again, the sentrence will need to be along the lines of "i am going to sleep, I feel nicely calm and relaxed," also, at the same time, immagine a relaxed environment (the rainforest, lake, in front of a mountain, a deserted beach... Whatever makes you feel calm and content)
this should keep your attention away from the dots.
I think your problem is that you have an active mind, so when you're not using it, it's still working... But in a different way.
You need to concentrate on otgher things to keep your mind busy in non-distractive, repetitive ways.
Gl!
Gl