Consider power allocation for Secondary User (SU) packet transmissions over multiple channels with variable Primary User (PU) arrival rates in cognitive radio networks. Two problems are studied in this paper: The first one is to minimize the collision probability with PUs and the second one is to maximize the data rate while keeping the collision probability bounded. It is shown that the optimal solution for the first problem is to allocate all power onto the best channel based on a certain criterion. The second problem with a per-channel power budget constraint is proven to be NP-hard and therefore a pseudo-polynomial time solution for the problem is proposed. When a total power budget for all channels is imposed in the second problem, a computationally efficient algorithm is introduced. The proposed algorithms are validated by numerical experiments.