Homogenization and behaviour of optimal controls for the wave equations in domains with oscillating boundary