Absolutely, there's nothing about hand sanitizer that makes it unfit for a soap dispenser. Make sure you indicate that it is indeed a hand sanitizer dispenser and not a soap dispenser to avoid confusion.