I was always fine with stars, but when in doubt return to the beginning to see if they attempted to tell us... for example, the opening shot in The Cage
has them talking about meteoroids
and the process (meteoroid beam/deflector) for keeping them from impacting the ship in flight.
So if stars aren't a good enough explanation, then they could be energized particles of debris accelerated by the ship's velocity via the meteoroid beam
and slowing down as they move passed the ship (disappearing moments after it passes).
I've found that with TOS they sometimes attempted to explain things early on, but later relaxed once they were comfortable with their audience. In the first few episodes, aspects of how things worked (a mechanism for deflecting random space debris and for producing gravitation within the ship) were fitted into dialog (most likely at the suggestion of their consultants from NASA and Rand), but dropped off as they felt that the audience was getting comfortable with the environment.
But lets face it, in TOS they had a handful of effects shots that they used over and over again, and the moving dots were designed to show a different speed from the dots in the background so that it didn't just look like the model was moving in front of a static background. So just like using an 11 foot model was done to add perspective in shots (making the Enterprise seem quite large), those dots were design to make space feel sort of 3D on the screen.
I always thought it was a nice touch even if it wasn't realistic
. It helped make the show visually exciting even back in an era where most of the people watching were seeing it on low resolution black and white TVs.