Had a 94 ram with 318 did something similar. Wide open or barley on the throttle was fine but anything in between it would buck and run terrible. I left the lights one day and had to jump start it. Ran fine for a bit. I checked the battery and connections, turns out the battery was on its way out. Swapped in a battery and problem went away. Something to check for anyway.