The optical sensor is located in the distributor:
remove the dist. cap, rotor, then there is a cover that needs to be removed. If you see brownish dust on it, that is a indication that the bearing in the dist. is bad. You can try blowing it off and see what happens.
In these engines the knock sensor is very rarely bad, the reason the code was set is because of the vibration caused by the miss. Concentrate on the miss, once that is fixed and the codes are erased see if it comes back.
Hopefully this link will work, it should help with the optical sensor & Camshaft sensor:
http://f1.grp.yahoofs.com/v1/UG_WS4C...out%20CMPS.pdf