Check out the interesting article in the Houston Chronicle on the Army's purchase and use of the M4 carbine: http://www.chron.com/disp/story.mpl/front/5715551.html
At $1400 a piece it looks like the army pays a lot more than I would for the same Colt made gun in semi-auto at a gun show. I'm sure the selective fire parts aren't that expensive!
I guess the paperwork is to blame for part of the extra cost. The real question is if the M4 is built to different specs than the civilian versions - harder metals, different coatings, etc.