I can understand how you feel because a similar thing happened to me, I am sure your breastfeeding is fine if you have done it with your 3 dc before and I am sure you know what you are doing. Your baby is on 50th in terms of weight - is your baby very tall/long? I think sometimes that doctors show an interest in that, but I am not certain.
In my case I had just come out of hospital after being re-admitted because I couldn't breath properly andmy baby had literally just started latching on - up to that point I had been expressing - so I was in seventh heaven about baby finally feeding properly, when a medical person told me they had concerns about weight and sent me back to hospital AGAIN.
They discharged us, but I learned that a baby not getting enough food (without blaming anyone) can have catastrophic long lasting affects and they had to check and although I was really annoyed at the time to be sent back in, as I felt sure everything was going in the right direction, looking back how I felt was both understandable and unreasonable.
Please don't take it personally or get upset or even think about the doctor, who was just doing their job, just do a double check that you are happy with how your baby is and if you are, you are!
I personally don't think the doctor said anything wrong, but if it is upset you, you could have a chat with the practice manage and explain why - I personally wouldn't complain in your shoes, more just explain how you feel.