Can I tell my boyfriend that he can't contact his best friend anymore?
Why do you want him to stop?
I really don't like his friend and I wish he would just stop talking to him
Not liking his friend is fine but that doesn't give you the right to tell him that he can't hang out with or talk to him anymore. That's extremely controlling and wrong of you. You want to interfere with a friendship just to prove to yourself that your boyfriend would do that for you rather than caring about how he feels.
I'm going to do it.
I don't think you should really ask him to give up his best friend. He will likely resent you for this, and may feel that you're treating him like a child. This can be very damaging to a long term relationship.