The problem of concentrating electromagnetic fields into a nanotube from an ambient source of light, is considered. An isogeometric analysis approach, in a boundary element method setting, is employed to evaluate the local electric field, which is represented with the exact same basis functions used in the geometric representation of the nanotube. Subsequently, shape optimization of the nanotubes is performed with the aim of maximizing the field concentration in their interior. The optimization framework comprises: (i) one global optimizer implemented as the combination of a derivative-free guided random search approach and a gradient-based algorithm for accurately determining the shape at the final stages, (ii) one parametric modeler generating valid non-self-intersecting nanotube shapes with a relatively small number of parameters, and (iii) one isogeometric-enabled boundary element method solver approximating the value of the electric field on the nanotube with high accuracy. The optimal shapes for a wide range of optical sizes are determined, resulting in a collected energy enhancement of more than two orders of magnitude, compared to the respective circular designs. Importantly, the frequency and angular responses of selected optimal shapes tend to maintain their superior performance over extensive wavelength and directional bands. Therefore, the presented results may assist substantially the photonic inverse design in nanotube-based setups with applications spanning from field localization and power accumulation to wave steering and energy harvesting.