I'm sure they will be fine; - the treats/bedding/woodshaving etc I bought for my hamster were designed for not only hamsters, but guinea pigs, rabbits, gerbils, chinchilla's + more
If your still not 100% sure, before giving it to your hamster, check with the shop you bought it from if they think it will be ok.