Ok, thank you for the clarification, I am very familiar with this condition. This setup on the rx300 is somewhat complicated, basically if certian malfunctions occur the computer goes into "limp" mode and shuts down the system. Overdrive is also effected by this. One note to make on this transmission also- by design the transmission overdrive gear is also locked out by the ECM until fluid temperature reaches normal temperature, so if you retest this RX cold after repairs don't freak out about no overdive until vehicle is warmed up. The oxygen sensor(most likely and commonly bank 1 sensor 1 heater circuit malfunction) code will not cause this condition, however it will cause the engine to run rich so I would recommend replacing the sensor as soon as possible.
As far as the knock sensors go here is my advise from my experience. There are 2 knock sensors on your vehicle, 1 on each cylinder head and both mounted below the lower intake manifold in the cylinder head valley. There is also a small subwiring harness that has the 2 connectors for the sensors that runs from the sensors to the main vehicle harness just under the thermostat (about 12 inches long), you will find when performing this repair that the connectors on the harness and the wiring have become brittle and weak from high heat exposure and the connectors will most likely break when removing from the knock sensors. There is a way to test the 2 knock sensors independantly to determine which one is bad but this process is frustrating and VERY time consuming. Also not that this is by no means an easy repair, if 1 sensor is bad today there is the possibility that the other one could fail next week and you do NOT want to pull the intake manifolds twice on this car (trust me on this one). My suggestion to you ( and I do this on every toyota/lexus with this engine and same failure) is to replace BOTH knock sensors while you have them exposed, also replace the sub wiring harness for the sensors. Note you will also need upper and lower intake manifold gaskets and antifreeze to complete the job. Be sure to clean the engine very well and use compressed air to clean the intake area before starting repair to ensure dirt/debris does not enter the engine while intakes are removed. Depending on your mileage you may also want to replace the rear valve cover gasket while the intake is off.
Depending on your level of experience this repair will take a minimum of 4-5 hours to complete. If you need/want the repair directions directly from the Lexus factory manual let me know and I can upload them in the morning.