Export dynamics as an optimal growth problem in the network of global economy