It's not the transmission. It may be the Idle Control Valve (IAC) This valve can be cleaned with brake cleaner spary or carburator cleaner.remove the air duct work. Inside the throat of the throttle body, you can see two holes to the side of the intake. Run the car at 1200 rpms or so and spray into those holes.turn off the engine and let the cleaner soak. Do this again a couple more times. until the engine runs smooth again. If that does not work. It may be a sensor like the throttle position sensor, the Maf , the Crankshaft sensor, etc. For that you will have to get a free scan at an auto parts store.