Potential engineering of optically trapped nanospheres