Honda 1980 xl250s problem?

My bike will not accelerate in 4th or 5th gear. It runs great in 1st 2nd and 3rd it tops out at about 35-40 in 3rd but once I shift to 4th it just stays at around 35mph.
When I give it more throttle in 4th gear it just makes a put put sound and looses speed. Can someone please tell me how to fix this.

Could be fuel starvation ( dirty carb or clogged filter) or a stretched, out of adjustment cam chain.

The only thing is I'd think either of those would show themselves in more than just 4th and 5th.

Were it me, I'd check that cam chain and thoroughly clean the carb for starters.