Can a pastor's house payment and other expenses equal to his housing allowance be paid directly from the church bank account?
Technically, the answer is yes. I know of no ministry that does this and I strongly recommend against it. Most church treasurers are busy enough without processing all the pastor's housing expenses. One check per pay period can be issued to the pastor to cover his cash compensation, plus his housing allowance.
If a pastor has opted out of social security does he have to show housing on the Form W-2?
First, he does not need to show it on Form W-2 because it is the church that prepares the form, not the pastor.
Regardless whether the pastor has opted out of social security, I strongly recommend that the church report the housing amount in Box 14 as a memo item. While it is not technically required, it reports to the pastor the amount that he must account for. Any excess designated amount above his actual expenses must be claimed as taxable income (Clergy Housing Allowance Clarification Act of 2002).