Is it possible they are unrelated to the guinea pigs? I have had a lot of tiny little flies in my guinea pig room for the last two weeks but I know it was because I left the windows open and the lights on one night by accident.
Could you post an image of them for identification. Try to make sure they are in good focus and under reasonably bright light as they will not be identifiable if they are just black spots.
Different species of fly are completely different, some are interested in the animals themselves, some just the faeces, some the damp hay, and others are entirely uninterested in the animals but just go to the warmest place they can find.
Here are some questions that could help with identifying them:
Do the flies fly around? Are they attracted to light? Do they cluster in certain areas of the cage? What bedding do you use? How often do you clean them out? Are they indoors or out? (If indoors; Do you have any windows open? Do you have any house plants or terrariums in the room/your house?)
Sorry for the list of questions, I am interested in invertebrates so may be able to tell whether they are harmful or not with a bit more information.