I need more information.
Is the rice already cooked? If so, and the specks weren't there before, I'd toss it, thinking it's probably mold.
If it's dry rice, you could just wash the rice before you use it. I once found it odd that there were some black grains in my rice bag. I almost went ahead and washed and cooked it, but I saw - just in time - that the bottom of the bag was chewed, and those black "rice" grains were really mouse poops!
Just black specks I'd probably just wash off, though.