help! wierd oil light problem

i have a 170 slant 6 . for some wierd reason when the car is idling the oil light stays on but once i accelerate the oil light turns off.and as im idling the car begins to shakes as if its going to turn off.my oil level is fine and the oil is clean i have a fresh oil pan gasket also... can anyone help me?does anyone know what could be causing this??