The perfect power problem for elliptic curves over function fields