We consider a binary distributed detection problem in a wireless sensor network with inhomogeneous sensors, in which sensors send their binary phase shift keying (BPSK) modulated decisions to the fusion center (FC) over orthogonal channels that are subject to pathloss, Rayleigh fading, and Gaussian noise. Assuming training based channel estimation, we consider a linear fusion rule which employs imperfect channel state information (CSI) to form the global decision at the FC. Under the constraint that the total transmit power of training and decision symbols at each sensor is fixed, we analytically derive the optimal power allocation between training and data at each sensor such that the deflection coefficient at the FC is maximized. Our analysis shows that the proposed optimal power allocation scheme is a function of signal-to-noise (SNR) and local detection indices, and at high SNR regime, the proposed scheme outperforms the uniform power allocation.