In this paper, we consider the two-way relay channel (TWRC) over which communication is performed using space-time block codes (STBC) with physical-layer network coding (PNC) protocol. The three-node two-way relaying (TWR) model consists of two end nodes (sources) simultaneously communicating with each other over a relay node where each node is equipped with two antennas and uses Alamouti's STBC to provide diversity. We consider non-reciprocal channels where fading channel coefficients are independent for opposite directions of the same link. We first derive closed form expressions for the outage probability of the STBC-TWR system and uncoded TWRC assuming equal transmit power at each node and decode-and-forward (DF) strategy at the relay. We show that the STBC-TWR system significantly improves the uncoded TWRC outage performance. Then, to further improve the performance, we propose an optimal power allocation in TWR scheme employing Alamouti's STBC and PNC protocol. The optimal power allocation is obtained by maximizing the sum-rate under the total power constraint. We show that the optimal power allocation considerably improve the outage performance as well as the sum-rate compared to the equal-power case.