Learning Markov k-Trees from Sequence Data: Optimality and Computation Efficiency