Using arduino code for mass production
Yes, but a number of points might discourage you.  See http://arduino.cc/en/Main/FAQ, at the question "Can I build a commercial product based on Arduino?"   If you started with the Eagle files for the Arduino, you'd have to make your schematics and layouts available.

A manufacturer can and will burn any file you want to on a chip.  If its a standard Hex file, this can often be done even before the chip is mounted.  If you require some sort of connection of your board with an IDE, you should expect to have to provide the whole programming environment to the manufacturer, maybe even including a computer, and you will pay more for doing this.