What is the subject in 有时间到我家去
Why need subject? It's a imperative. "有时间“ just modifies the sentence as a condition. Comparing with some English sentences:

Well, I'm going. Call me later.
Well, I'm going. Don't forget closing the door.


You don't need subject as well.

For you second question, 

would it be possible to say: 如果有时间 , 到我家去.


It's rare to say like that. Firstly "如果” is unnecessary for short condition. Secondly saying that would sound very formal. The whole sentence itself is not formal. Actually it's not an invitation at all. It just express willing of friendship.

For real invitation, normally he will ask for your availability at first. For example, 下个星期有空吗？到我家去喝茶/吃饭