Is the "shi" in "jin tian shi ji hao" optional, and can I ask "jin tian ji ri?"
These are correct expressions:


今天是星期几？
今天星期几？
今天是几号？
今天几号？


是 is omissible. Interesting enough that we don't usually say 今天几日.  If you say 今天几日，I would probably have to digest it a little bit internally to figure out what you mean.