Optimal control of interbank contagion under complete information