Yes , just be sure to boil them first in a small ammount of water to sterilize them , or you could have problems with any bacteria present on or in the chilis.
I do it with a lot of different herbs and spices , and I add the water that was used for boiling , into the milk for more flavor.