Ultra-compact dwarf galaxy formation by tidal stripping of nucleated dwarf galaxies