Dogs may bark at strangers and company because they think they are protecting you, they are nervous themselves or simply because they haven't learned any better. A combination of socialization and obedience work should be all it takes to teach your dog he doesn't need to bark at people.
Socialize your dog. Get him out for walks and visits to the dog park. He needs to be around other dogs and people and learn there is no reason to be nervous or defensive. Of course, if he barks while out on a leash, too, this can be a challenge, so start with quieter neighborhoods where he can get used to the concept of being out without constantly being on alert.
Teach the "quiet" command. When your dog barks, let him bark two or three times, then gently wrap your fingers around his muzzle and say "quiet." When he quits barking, give him a treat and praise. Repeat the process until he quits barking on command. Be generous with the treats to keep his attention.
Enlist help from friends. Have a sympathetic friend, whom your dog doesn't know, come to visit. Work on the "quiet" command. Ideally, he will remember what he should do and stop barking on command. If not, work with him while your friend is there.
Continue to work with your dog, by inviting friends over to the house and reinforcing the quiet command. Once he understands the command, stop treating each time. When the time comes that you have company over and he doesn't bark, praise him and treat him generously.