Optimal Bank Regulation and Monetary Policy