The majority of your success, whether you are dieting or bulking, is going to come from hitting the right number of calories and the correct ratio of protein/carbs/fat. So, considering only short term physique goals, I believe fast food can be incorporated into a diet and will yield the results you are looking for in terms of fat loss or muscle gain.....assuming you are weighing, tracking and counting your food intake. However, much of that food is pure, freaking ****. Like the lowest of the low in meat quality, fillers, and preservatives. So from a general health stand point of view, I stay away from that stuff as much as possible. On occasion ill eat at McD's if im on the road or in a pinch, but ill stick to their grilled chicken, yogurt, fruit, etc. Does it work as fuel? Yea....but IMOP, it can really effect long term health and wellness.
I would also point out that if you plan on gaining 40 lbs in the next 4-5 months, much of it will be fat. Even if you are on a big dose of anabolics, you might be best slowing your rate of gain down. As a natural, I dont set my sights on any more than a couple lbs per month gain.