At least 10 people have been killed and dozens more injured after an explosion at a military barracks in Bolivia.