If idle is not fluctuating when in Neutral or Park then its something in your transmission ...most likely the torque converter.
When the car is acelerating or decelerating the RPM of the Engine Flywheel and Transmission input (Drive shaft) are at different speeds.... This means the torque converter has to do torque manipulation to make sure the car operates transparently to the user.
RPM fluctuation happens in this case when the torque converter is not doing enough torque manipulation or its slipping and having issues cancelling out the difference in RPM between the flywheel and the transmission input shaft. It doesnt happen past a certain RPM because the torque converter locks up ..basically connectiong the input shaft of the drive shaft directly to the flywheel. This is done for better gas mileage once the car has gotten up to speed in that gear...saves on gas by eliminating ineffeciencies within the torque converter
If your torque converter is failing your car can also feel very sluggish from the start...its its slipping then your RPM will go up fast but the car wont be moving like it should...if it is locking up prematurely and sticking then your engine will "bog down" when getting off the line because the torque converter is not "stalling" enough to allow the engine to reach its optimum power band before transfering power into the input shaft of the transmission.
Sometimes the torque converter is not working right because bad or low fluid. It is fluid controlled so changing or topping up the fluid can work. Other times its a mechanical problem and the torque converter needs to be replaced.