Optimal pruning for balance minimization in causal inference