The bolts can be left long.
If the clearance is less then 1/16" and the shim won't slide in, then the caulking will do it for you. Pick up some polyseamseal, caulk it and then let it dry.
If these shims are too large, then nothing is going to work except caulking it. Which you would do regardless.