You can commute on anything. The question is whether it will be comfortable and efficient. A bmx bike wouldn't be my first choice, but if it works for you, great.
And for what it's worth, you can ride a road bike on gravel roads pretty easily. Even a CF frame and 23mm tubulars: