Where are you getting these numbers? They seem rather high.
They were mostly from eastern Europe, imported from the Genoese colonies on the Black Sea. They were typically women who worked in the households of the wealthy as a status symbol. Some could certainly work on the docks, but the overwhelming majority would have been female.
Steven Epstein has a good book about slavery in medieval Italy called Speaking of Slavery. It's a little esoteric, but not bad, but I really like Epstein. Balard has done a lot of work on the Genoese in the Black Sea.
I would say that these figures most probably refer to non-christian prisoners of war, convicts, and other criminals like captured pirates. However, after the eleventh century pressure from free laborers made slavery (as well as serfdom) mostly absent from mediterranean urban centers, so I'm consequentially unenthusiastic about the 10%-20% estimate. Can I ask where you got it from? It might be inflated due to multiple forms of servitude being included.