A New Method of Determining the Initial Size and Lorentz Factor of Gamma-Ray Burst Fireballs Using a Thermal Emission Component