Surely if your gaining muscle but a little fat then the simple answer is that you are consuming too many carb.
Yes you need a certain intake to fuel your body and leave it in an anabolic state but eat too many and your body will store it.
Don't also forget about fats consumed. Where are you getting these from and what sorts. You need a certain amount of these two.
The intake of those together is your problem imho..