Structural and Electronic Properties of Bismuth and Lead Nanowires Inside Carbon Nanotubes