Optimal Capital Requirements in Financial Networks with Fire Sales