Definitely get a rough estimate before you choose a dentist -- for the filling and for the X-ray. The dentist's office will be reluctant to be specific because so many unexpected problems might complicate the procedure and raise the price. But a rough initial estimate is certainly possible. If the dentist won't give one, ask another dentist.
Charlotte's rough guide is accurate, but it is important to make sure the dentist agrees before getting into the chair.
Regarding dental insurance, you'll find that it is very expensive -- often more expensive than you'd pay out of pocket. It is handy if you encounter an unexpected emergency procedure -- like a root canal, or crown, etc. I'd start by getting a list of procedures and prices from the dentist you favour, ask him/her for a recommended insurance company, then do your analysis of whether buying insurance makes sense or not. It has never made financial sense for me, as a personal comment.