Towards optimal softening in three-dimensionalN-body codes - I. Minimizing the force error | Synapse