This invention provides a method for controlling production operations using fiber optic devices. An optical fiber carrying fiber-optic sensors is deployed downhole to provide information about downhole conditions. Parameters related to the chemicals being used for surface treatments are measured in real time and on-line, and these measured parameters are used to control the dosage of chemicals into the surface treatment system. The information is also used to control downhole devices that may be a packer, choke, sliding sleeve, perforating device, flow control valve, completion device, an anchor or any other device. Provision is also made for control of secondary recovery operations online using the downhole sensors to monitor the reservoir conditions. The present invention also provides a method of generating motive power in a wellbore utilizing optical energy. This can be done directly or indirectly, e.g., by first producing electrical energy that is then converted to another form of energy.