It's not because the 91 was put in the tank.
Putting 91 in on your 87 tune is just like putting 91 in on the stock tune, should actually make a few more HP.
The car running and shaking like you describe sounds more like you have un-metered air getting in. Maybe a hose loose on the CAI.
Only thing that could be involving the gas is if it was junk gas.