One of my trucks had a similar problem once. Ran ok at low speed and level terrain, but would backfire and stall when the engine was under load or on a hill. Had to tow it home once because it would not pull the grade near the house. Turned out to be rust and sediment in the fuel tank and filter. Just a thought.