Absolutely. In fact, glue is by far the most reliable way to lay hardwood floors because of how strong and permanent modern glues are now.