Welcome to Apple Support Communities
If you only need Windows to run one program (and if this problem does not require the best GPU performance), I recommend you to install Windows in a virtual machine instead of using Boot Camp. With this, you will be able to run Windows without restarting your Mac and there will be no risks during the installation.
To make a virtual machine, you can use an application like Parallels, VMware Fusion or VirtualBox. Then, you only need to get a ISO file of Windows 8.1 with a product key, so you can install it in a virtual machine.
If you still want to install Windows with Boot Camp, you can install Windows from a USB drive (it is the only way in your iMac apart from using an external disc drive). To create the USB drive with Windows, you also need a ISO file of Windows 8.1. You have all the steps in this site > http://manuals.info.apple.com/MANUALS/1000/MA1636/en_US/boot_camp_install-setup_ 10.8.pdf