Optimal control of plant root tip dynamics in soil