Charge coupled devices and solid state optical sensors