Optimal Corporate Taxation Under Financial Frictions