Toward a Theory of Optimal Financial Structure