The bugs are grain mites or something like that which feeds off the alfalfa. However, the pellets are a very bad choice for bearded dragon substrate...in fact I wouldn't recommend it for any reptile. Take the stuff back to the petstore for a refund is my suggestion. If they won't give you one, toss it and clean out the cage to get rid of the bugs and switch to any of the saver (and far cheaper) substrates commonly recommended here. Things like plain newsprint, paper towel, newspaper, parcel paper (basically brown paper used to wrap parcels), non stick shelf liner, plastic table cloths or what others here have already recommended.
Oh the bugs themselves won't bother your dragon as they are not parasites and have no interest in blood etc. from your dragon as typical reptile mites would. However they can be annoying but once you clear out all the pellets and your dragon's cage, the bugs should vanish in short order.
And to answer your earlier question about D3 supplements...Rep Cal is a good brand to go with as well as Sticky Tongue brand. There are a couple others but I can't recall them myself. Just dust your dragon's insects every other day (as I believe your dragon is over 6 months...if he's not, then once a day is fine). Don't dust the vegetables. Just make sure you are feeding good sorts of greens like collards, dandelion greens, mustard greens and the like. Oh and replace one calcium dusting twice a week for under 6 month old dragons with a multivitamin and once a week for older dragons.
-----
PHLdyPayne