Most likely situation is the wheel isn't full seated in the frame. With the bike standing upright on the ground loosen the wheel bolts and lean a bit on the bike which will force the wheel all the way into the dropouts. While still leaning on the bike tighten the wheel bolts. Be sure to alternate bolts when tightening. A lot of times people tighten one side first and the torque causes the other side of the axle to slide slightly out of the dropout resulting in a wobble.