Optimal design of the band structure for beam lattice metamaterials