Yep, you can do something like this:
#Allow website access to only certain IPs. Everyone else is prompted for a username and password.
Deny from all
Allow from 192.168.
Allow from 172.17.1.2
Allow from 127.0.0.1
AuthUserFile C:\\path\ o\\passwords\\.htpasswd
AuthName "Test Site"
require user testuser
#end website allow
If you need to use a wildcard, just leave off the octets where you want the wildcard to be.