In the present work a genetic algorithm is used to find the optimum profile of longitudinal convective heat dissipating fins located in a tube where a viscous fluid passes through in laminar flow. To this aim, velocity and temperature distributions in the finned tube are determined with the help of a finite element model, which takes the effect of viscous dissipation into account. A global heat transfer coefficient is consequently calculated. After having assigned a polynomial lateral profile to the fins of the tube, the geometry is then optimized in order to maximize the heat transferred per unit of tube length respecting constraints on the tube weight or the pressure drop along the duct.