His father decided even when Luka was born that he would be the "perfect shrine maiden", Luka's elder sister was a tomboyish biker-type chick who shirked all her responsibilities on to her timid and lithe younger brother. Their father insisted on garbing Luka as a miko and forced him to carry out the duties typically given to females from a young age.
His entire chapter in the original story is about how even if he's 'I' (boku) or 'me' (watashi), that doesn't matter at all. Male or female, Lukako is Lukako in the eyes of Okabe Rintaro, he's a beloved friend and disciple. Someone that does not need to change himself in order to feel more accepted. Okabe comes to terms with how Luka feels for him and, while he can't reciprocate, he can definitely acknowledge them in his own way.
In summary, Luka's desire to become a female is not born out of misplaced identity or gender complications, it is born out of a belief that his confused feelings towards Okabe would somehow become more appropriate to act upon. Luka is of the firm belief that if he were born as a girl, he'd definitely get together with Okabe (though he still has the same shyness even as a girl).
I'm quite fond of Luka's story in the VN, because it's about embracing yourself no matter what you are and not forcing yourself to change.
I believe his character song best sums this up: