I am not sure if this is true in your case, but if the leavening is not evenly distributed in the cake batter, that can cause holes to form. Sometimes baking soda especially will clump, so it is important to mix your dry ingredients together well to prevent this.
If the above does not work try this . after panning the cake let bang it down a few times on a counter, let it sit a few minutes and bang again then bake. This helps fill any air pockets and breaks any bubbles you have created by panning the batter.
What kind of bubbles are you talking about? round holes or long, wormhole type holes?
The long holes are caused by too much mixing after adding the flour unless it's a kind of cake where the soft butter is mixed directly with the flour first. The cake would also tend to be dry if this is the case.