Yes, you can use a baseball bat in Left 4 Dead 2. It's one of the melee weapons available to fend off the infected when it spawns in a level.