Your problem is with a malfunctioning light. Every time your light comes on, your transmission shifting problem starts. To fix your problem just replace the bulb.
Sorry for kidding around; I know transmission problems are frustrating and can be expensive, just trying to help with the stress.
I hope this helps,
Jeff Wilson, Phoenix, AZ.