The code for the /proc/cpia/video0 is present in the cpia-driver in the kernel, but the write access is commented out. These updates versions of the followjng files restore the write access. Replace your existing files with these files and recompile the kernel, and copy in these new modules (they have to be modules, not compiled in to the kernel.)
There is a bug in some kernel versions that makes it impossible to compile them outside the kernel tree because of symbol exporting problems. (Reference?).
Note that the code to write to the /proc/cpia device was originally commented out of the driver because of a buffer overflow. I dunno where it is or whether it's fixed, but this code works for me and I don't have nefarious individuals trying to use my Qx3 microsocope. Your mileage may vary.
alias bottomlight="echo bottomlight: on >/proc/cpia/video0; echo toplight: off >/proc/cpia/video0" alias toplight="echo toplight: on >/proc/cpia/video0; echo bottomlight: off >/proc/cpia/video0"; alias nolight="echo toplight: off >/proc/cpia/video0; echo bottomlight: off >/proc/cpia/video0" alias bothlights="echo toplight: on >/proc/cpia/video0; echo bottomlight: on >/proc/cpia/video0"
Get the original source for the cpia driver from http://webcam.sourceforge.net and hack it yourself.
These were made with w3camd, as I couldn't get xawtv to dump proper images.