Yeah, without seeing a picture I can't say for definate but propably the larvae of the case making moth, google it and check the pics.
Collect a few of the little critters and keep in a jam jar to show to the pest controllers. Lift the carpet at the edges and hoover "very diligently" the edge, the floor underneath and indeed the whole carpet. Do this every 2 days for a few months.
Check for small thin black moths in the room/house. They are usually much more stationery than typical flies. They need to breed to lay eggs on the carpet for the larvae to hatch.
Check your clothes for moth holes, wash everything and clean presses, drawers etc. Throw out everything you don't use regularly.
It's a tough job to eradicate these things.