if it stalls at stop signs and red lights, just DON"T STOP
but seriously, check fuel filter, plugs and all your basic tuneup stuff
: plugs, wires.
On my 95 Nissan Pickup same engine as you, they say not to adjust the timing but the thing was having a hard time keeping a steady idle. I turned the distributor advancing the timing just a smidge. that made all the difference in the world. I never had the timing actually checked, just bumped it a bit.
Oxygen sensor could also cause it
Everything above is cheaper than most any engine sensor, so be damn sure it isn't one of the cheap problems above before you spend 80 or 100 or more dollars on a sensor such as the O2, MAF or the controller.
The oxygen sensor usually goes around 80,000 miles in the KA24DE? I had two but am no expert, that is when I noticed mine were going due to very low fuel economy.