We study the performance optimization problem of the long term evolution (LTE) network operating in the unlicensed band and sharing it with an existing WiFi network. We consider the LTE network to be based on the frame-based listen-before-talk protocol. We formulate the joint channel assignment and channel occupancy time optimization problem using a stochastic integer programming (IP) model. By applying the Lyapunov drift-plus-penalty theorem, we develop an asymptotically optimal solution with polynomial time-complexity for the stochastic IP problem. Numerical results are presented and the performance of the proposed solution is compared to the performance of two alternative approaches in which the channel assignment and channel occupancy time are determined sequentially.