In this letter, we consider a two-way relay channel where two source nodes exchange their packets via a half-duplex relay node, which adopts physical-layer network coding (PNC) for exchanging packets in two time slots. Convolutional codes (CCs) are assumed to be applied as a channel code for each packet. The relay node directly decodes the XORed version of packets of two source nodes in the multiple access (MA) phase. We first mathematically analyze a bit error rate (BER) of the MA phase in the PNC with CCs in Rayleigh fading channels. Then, we propose a power allocation (PA) strategy for minimizing the derived BER expression at the relay node. It is shown that the proposed transmit power solution satisfies the following relationship: ${P_{1}^{\ast}\over P_{2}^{\ast}}=\sqrt{\Omega_{2}\over\Omega_{1}} $, where $P_{i}^{\ast}$ and $\Omega_{i}$ denote the optimal power of the $i$th source node and the variance of the channel gains between the $i$th source node and the relay node. The proposed PA strategy significantly outperforms conventional PA schemes in terms of the BER.