you can use a media query for this. but first use that logo image in background.
assuming that you use .logo
for the logo classmate university
HTML:
<a class="navbar-brand" href="#"><span class="logo"></span></a>
CSS:
@media(max-width:767px){
.logo{
background:url(images/hat.png) no-repeat;
width : 400px;
display:block;
}
}
/* this logo will be used for everything outside of the above breakpoint */
.logo{background:url(images/logoWhite.png)