Effective interaction for charge carriers confined in quasi-one-dimensional nanostructures