Optimal control for a second order linear evolution problem in a domain with oscillating boundary