Optimizing Tool Selection for LLM Workflows with Differentiable Programming