Absolutely. Of course, it's better to use a combination of headphones and studio monitors, but if you only have headphones, it's not the end of the world.  Once again, referencing saves the day here. Learn your headphones and how well-mixed songs sound through them. Also, referencing other devices you have lying around can make you even more sure of your mix.