If your issue only happens when you tow a certain trailer I would check the trailer first. A tire with broken belts can cause some strange reactions. If you are convinced is is the transmission it needs checked ASAP as the shuttering will most likely destroy it.