The oil light is due to sediments in the crankcase clogging the oil pump pick-up screen & tubing. I had the same problem a few weeks ago and resolved the matter with a motor oil & filter change. If it were a more serious problem, the light would not go off so easily when you press the gas pedal.
If the problem only improves somewhat or is still unresolved, substitue 16 oz. of motor oil with Marvel Mystery Oil (do not overfill the crankcase). Change the oil & filter in two hundred miles, but then substitute 32 oz. of oil with MMO and drive 500 miles before changing the oil & filter again. Keep using the MMO in the crankcase and changing the oil & filter every additional 1,000 miles, for up to 3,000 miles.
This process will clear any stubborn clogs. It works best when the engine is hot, so drive the car at highway speeds as much as possible (or drive 35 MPH in L1 gear). It also helps to use Mobil 1 motor oil, though it is considerably more expensive.