Analysis of optical properties of nanowires using surface integral equations and the multilevel fast multipole algorithm